﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="pop_shipcompList.ascx.cs" Inherits="uswinweb.datacontrol.pop_shipcompList" %>
<table border="0" cellpadding="0" cellspacing="0" class="edtb2">
    <thead>
        <tr>
            <td>
                代码
            </td>
            <td>
                名称
            </td>
            <td>
                英文名
            </td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <input id="search_txt1" name="search_txt1" value="<%=tcode %>" onkeydown="if(event.keyCode==13){event.keyCode=9;}"
                    onchange="shipcompsearch(document.getElementById('search_txt1').value,document.getElementById('search_txt2').value,document.getElementById('search_txt3').value,'tcode')"
                    type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'"
                    style="width: 100px;" />
            </td>
            <td>
                <input id="search_txt2" name="search_txt2" value="<%=name %>" onkeydown="if(event.keyCode==13){event.keyCode=9;}"
                    onchange="shipcompsearch(document.getElementById('search_txt1').value,document.getElementById('search_txt2').value,document.getElementById('search_txt3').value,'name')"
                    type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'"
                    style="width: 100px;" />
            </td>
            <td>
                <input id="search_txt3" name="search_txt3" value="<%=ename %>" onkeydown="if(event.keyCode==13){event.keyCode=9;}"
                    onchange="shipcompsearch(document.getElementById('search_txt1').value,document.getElementById('search_txt2').value,document.getElementById('search_txt3').value,'ename')"
                    type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'"
                    style="width: 100px;" />
            </td>
        </tr>
        <% int i = 1;
           foreach (System.Data.DataRow dr in shipcompTab.Rows)
           { %>
        <tr class="tp" onmouseover="jQuery(this).addClass('co3');" onmouseout="jQuery(this).removeClass('co3');"
            onclick="shipcomp_luffy('<%=dr["ename"] %>','shipcomp_hidd','<%=dr["tcode"] %>')">
            <td>
                <%=dr["tcode"].ToString() == "" ? "&nbsp;" : dr["tcode"]%>
            </td>
            <td id="shipcomp_hidd_<%=i %>" name="<%=dr["tcode"] %>">
                <%=dr["name"].ToString() == "" ? "&nbsp;" : dr["name"]%>
            </td>
            <td>
                <%=dr["ename"].ToString() == "" ? "&nbsp" : dr["ename"]%>
            </td>
        </tr>
        <%
i++;
                                   } %>
    </tbody>
    <tfoot>
        <tr>
            <td colspan="3">
                <%=pageList %>
            </td>
        </tr>
    </tfoot>
</table>
<script type="text/javascript">
    function shipcompsearch(val, val2, val3, val4) {
        loading();
        AjaxHelper.Updater('pop_shipcompList.ascx', 'showdata2', 'action=search&tcode=' + val + '&name=' + val2 + '&ename=' + val3 + '&seatype=' + val4 + '&parms=' + val + '');
    }
    function shipcomp_luffy(val1, val2, val3) {
        document.getElementById(val2 + '_luffy').value = val3;
        document.getElementById(val2 + '_mino').innerHTML = val1;
        document.getElementById(val2 + '_div').slideUp("slow");
    }
</script>
